Find all points of relative minima and maxima